#@weiXinLayout("我的信息")
#define weiXinMain()
#@navBar("我的信息",contextPath+"/weixin/mine")
<form id="submitForm">
<div class="weui-cells__title">真实姓名</div>
<div class="weui-cells">
    <div class="weui-cell">
        <div class="weui-cell__bd">
            <input class="weui-input" value="#(memberInfo.realname??'')" name="realname" type="text" placeholder="请输入真实姓名...">
        </div>
    </div>
</div>
<div class="weui-cells__title">身份证号</div>
<div class="weui-cells">
    <div class="weui-cell">
        <div class="weui-cell__bd">
            <input class="weui-input" value="#(memberInfo.identify??'')" name="identify" type="text" placeholder="请输入身份证号...">
        </div>
    </div>
</div>
<div class="weui-cells__title">电子邮箱</div>
<div class="weui-cells">
    <div class="weui-cell">
        <div class="weui-cell__bd">
            <input class="weui-input" value="#(memberInfo.email??'')" name="email" type="text" placeholder="请输入电子邮箱...">
        </div>
    </div>
</div>

<div class="button-padding">
    <input type="hidden" name="id" value="#(memberInfo.id??'')" name="id">
    <a href="javascript:;" id="submitBtn" class="weui-btn weui-btn_primary">保存信息</a>
</div>
</form>
#end

#define weiXinCss()
#end

#define weiXinJs()
<script>
    $(document).ready(function(){
        $("#submitBtn").click(function(){
            $.confirm({
                "title":"系统提示",
                "text":"确定要进行当前操作么？",
                "onOK":function(){
                    var config ={
                        "url":"#(contextPath)/weixin/mine/doUpdateMemberInfo",
                        "data":$("#submitForm").serialize(),
                        "successCallBack":function(resp){
                            if(resp.result){
                                $.alert(resp.data,function(){
                                    window.location.href="#(contextPath)/weixin/mine"
                                });
                            }else{
                                $.alert(resp.data);
                            }
                        }
                    };
                    var ajax = new AjaxUtils(config);
                    ajax.executeRequest();
                }
            })
        });
    })
</script>
#end
